package lcr;

public class Test0069 {
}

class Solution0069_1 {
    public int peakIndexInMountainArray(int[] arr) {
        int len = arr.length, left = 0, right = len - 1;

        while (left < right){
            int mid = (left + right) >> 1;
            int num = arr[mid];
            if (num > arr[mid + 1])right = mid;
            else left = mid + 1;
        }

        return left;
    }
}
